package com.technology.education.data.model

/**
 *@author:create by BZY
 *Date: 2022/3/21 11
 * 教师端首页待接单列表
 */
data class TeachOrderModel(
    val appointMe: String, //我是否是被指派老师，1是0否
    val id: String,
    val placeTime: String,
    val question: String,
    val questionImage: String,
    val student: Student,
    val teacher: TeacherInfoModel?,
    var teachOrderState: String //状态 1派单中 2抢单中 3已接单 4辅导中 5待评价 6审核中 7审核未通过 8已完成 9已取消
) {
    val appointString: String get() = if (isAppoint) "派" else "抢"
    val status: String
        get() = when (teachOrderState) {
            "1" -> "派单中"
            "2" -> "抢单中"
            "3" -> "已接单"
            "4" -> "辅导中"
            "5" -> "待评价"
            "6" -> "审核中"
            "7" -> "审核未通过"
            "8" -> "已完成"
            "9" -> "已取消"
            else -> ""
        }

    val visibleButton:Boolean get() = teachOrderState=="1"||teachOrderState=="2"

    /**
     * 是否为指派老师
     */
    val isAppoint: Boolean get() = appointMe == "1"
}

